<div class="container-fluid">
  <h3 style="color:#8C525B;border-bottom:1px solid #F1F1F1;padding-bottom:10px;padding-left:10px;">联系记录</h3>
  <div class="panel panel-default">
    <div class="panel-heading">
      <p class="panel-title" style="height:35px;line-height:35px">
        联系记录列表
        <a href="relation.php?action=add" class="btn btn-info pull-right">添加</a>
      </p>
    </div>
    <div class="panel-body">
      <table class=" table table-bordered" >
        <tr>
          <th><strong>#
          </strong></th>
          <th><strong>客户</strong></th>
          <th><strong>
              联系时间
          </strong></th>
          <th><strong>下次联系时间</strong></th>
          <th><strong>联系方式</strong></th>
          <th><strong>联系主题</strong></th>
          <th><strong>备注</strong></th>
          <th><strong>基本操作</strong></th>
        </tr>
        <?php if(isset($res)):?>
        <?php foreach($res as $v):?>
        <tr>
            <td><?php echo $v['r_id'];?></td>
            <td><?php echo $v['c_name'];?></td>
            <td><?php echo $v['r_contime'];?></td>
            <td><?php echo $v['r_nextcontime'];?></td>
            <td><?php echo $v['r_contype'];?></td>
            <td><?php echo $v['r_contheme'];?></td>
            <td><?php echo $v['r_comment'];?></td>
            <td>
               <a href="relation.php?action=update&id=<?php echo $v['r_id']?>"><span class="glyphicon glyphicon-edit"></span>编辑</a>
               <a href="relation.php?action=del&id=<?php echo $v['r_id']?>"><span class="glyphicon glyphicon-trash"></span>删除</a>
            </td>
        </tr>
        <?php endforeach;?>
        <?php endif;?>
      </table>
      <div>
        <span class="pull-left">共有<?php echo $rowNum;?>条记录，当前第<?php echo $page;?>/<?php echo $maxPage;?>页</span>
        <ul class="pagination pull-right">
            <li><a href="relation.php?action=list&page=1">首页</a></li>
            <li><a href="relation.php?action=list&page=<?php echo  ($page!=1)?$page-1:1;?>">上一页</a></li>
            <li><a href="relation.php?action=list&page=<?php echo  ($page!=$maxPage)?$page+1:$maxPage;?>">下一页</a></li>
            <li><a href="relation.php?action=list&page=<?php echo $maxPage?>">尾页</a></li>
        </ul>
      </div>
    </div>
  </div>
</div>
